// prettier-ignore
export default {
    "betterErrors": "import { type, type ArkErrors } from \"arktype\"\n\nconst User = type({\n\tname: \"string\",\n\tplatform: \"'android' | 'ios'\",\n\t\"versions?\": \"(number | string)[]\"\n})\n\ninterface RuntimeErrors extends ArkErrors {\n\t/**platform must be \"android\" or \"ios\" (was \"enigma\")\nversions[2] must be a number or a string (was bigint)*/\n\tsummary: string\n}\n\nconst narrowMessage = (e: ArkErrors): e is RuntimeErrors => true\n\n// ---cut---\nconst out = User({\n\tname: \"Alan Turing\",\n\tplatform: \"enigma\",\n\tversions: [0, \"1\", 0n]\n})\n\nif (out instanceof type.errors) {\n\t// ---cut-start---\n\tif (!narrowMessage(out)) throw new Error()\n\t// ---cut-end---\n\t// hover summary to see validation errors\n\tconsole.error(out.summary)\n}",
    "clarityAndConcision": "// @errors: 2322\nimport { type } from \"arktype\"\n// this file is written in JS so that it can include a syntax error\n// without creating a type error while still displaying the error in twoslash\n// ---cut---\n// hover me\nconst User = type({\n\tname: \"string\",\n\tplatform: \"'android' | 'ios'\",\n\t\"versions?\": \"number | string)[]\"\n})",
    "deepIntrospectability": "import { type } from \"arktype\"\n\nconst User = type({\n\tname: \"string\",\n\tdevice: {\n\t\tplatform: \"'android' | 'ios'\",\n\t\t\"version?\": \"number | string\"\n\t}\n})\n\n// ---cut---\nUser.extends(\"object\") // true\nUser.extends(\"string\") // false\n// true (string is narrower than unknown)\nUser.extends({\n\tname: \"unknown\"\n})\n// false (string is wider than \"Alan\")\nUser.extends({\n\tname: \"'Alan'\"\n})",
    "intrinsicOptimization": "import { type } from \"arktype\"\n// prettier-ignore\n// ---cut---\n// all unions are optimally discriminated\n// even if multiple/nested paths are needed\nconst Account = type({\n\tkind: \"'admin'\",\n\t\"powers?\": \"string[]\"\n}).or({\n\tkind: \"'superadmin'\",\n\t\"superpowers?\": \"string[]\"\n}).or({\n\tkind: \"'pleb'\"\n})",
    "unparalleledDx": "// @noErrors\nimport { type } from \"arktype\"\n// prettier-ignore\n// ---cut---\nconst User = type({\n\tname: \"string\",\n\tplatform: \"'android' | 'ios'\",\n\t\"version?\": \"number | s\"\n\t//                     ^|\n})",
    "nestedTypeInScopeError": "// @errors: 2322\nimport { scope } from \"arktype\"\n// ---cut---\nconst myScope = scope({\n\tid: \"string#id\",\n\tuser: type({\n\t\tname: \"string\",\n\t\tid: \"id\"\n\t})\n})"
}
